<?php require_once('inc/conn.php'); ?>

<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title></title>

    <!--360 browser -->
    <meta name="renderer" content="webkit">
    <meta name="author" content="wos">
    <!-- Android -->
    <meta name="mobile-web-app-capable" content="yes">
    <link rel="icon" sizes="192x192" href="images/i/app.png">
    <!--Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="apple-touch-icon-precomposed" href="images/i/app.png">
    <!--Win8 or 10 -->
    <meta name="msapplication-TileImage" content="images/i/app.png">
    <meta name="msapplication-TileColor" content="#e1652f">

    <link rel="icon" type="image/png" href="images/i/favicon.png">
    <link rel="stylesheet" href="assets/css/amazeui.min.css">
    <link rel="stylesheet" href="css/public.css">

    <!--[if (gte IE 9)|!(IE)]><!-->
    <script src="assets/js/jquery.min.js"></script>
    <!--<![endif]-->
    <!--[if lte IE 8 ]>
    <script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
    <script src="assets/js/amazeui.ie8polyfill.min.js"></script>
    <![endif]-->
    <script src="assets/js/amazeui.min.js"></script>
    <script src="js/public.js"></script>
</head>
<body>

<header class="am-topbar am-topbar-fixed-top wos-header">
    <div class="am-container">
        <h1 class="am-topbar-brand">
            <a href="index.php"><img src="images/logo.png" alt=""></a>
        </h1>

        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-warning am-show-sm-only"
                data-am-collapse="{target: '#collapse-head'}">
            <span class="am-sr-only">导航切换</span>
            <span class="am-icon-bars"></span>
        </button>

        <div class="am-collapse am-topbar-collapse" id="collapse-head">
            <ul class="am-nav am-nav-pills am-topbar-nav">
                <li ><a href="index.php" target="_blank">首页</a></li>
             

                <li class="am-active"><a href="category.php">专栏</a></li>
                <li><a href="liuyan.php" target="_blank">留言板</a></li>
            </ul>

            <div class="am-topbar-right">
                <button class="am-btn am-btn-default am-topbar-btn am-btn-sm"><span class="am-icon-pencil"></span>注册</button>
            </div>

            <div class="am-topbar-right">
                <button class="am-btn am-btn-danger am-topbar-btn am-btn-sm"><span class="am-icon-user"></span> 登录</button>
            </div>
        </div>
    </div>
</header>

<div class="am-list-news-bd">
    <ul class="am-list">


        <?php
        $total_num=mysql_num_rows(mysql_query("SELECT id FROM biao"));
        $pagesize=10;
        $page_num=ceil($total_num/$pagesize);
        $page=@$_GET['page'];
        if($page<1||$page==''){
            $page=1;
        }
        if($page>$page_num){
            $page=$page_num;
        }
        $offset=$pagesize*($page-1);
        $prepage=($page<>1)?$page-1:$page;
        $nextpage=($page<>$page_num)?$page+1:$page;
        $sql="SELECT * FROM biao LIMIT $offset,$pagesize";
        $result=mysql_query($sql);
        while($row=mysql_fetch_array($result)){


//                    $sql="SELECT * FROM biao LIMIT 17,5";
//                    $result=mysql_query($sql);
//                    while($row=mysql_fetch_array($result)){
                    ?>
        <li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left" data-am-scrollspy="{animation:'fade'}"><a href="infopage.php?id=<?php echo $row['id'] ?>">
            <div class=" am-u-sm-7 am-list-main">
                <h3 class="am-list-item-hd"> <?php echo $row['insert_title'] ?></h3>
                <div class="am-list-item-text"><?php echo $row['insert_title'] ?></div>
            </div>
        </a>
        </li>
        <div class="newsico am-fr">
            <i class="am-icon-clock-o"><?php
                if($row['update_time']){
                    echo date('Y-m-d',$row['update_time']);
                }else if($row['create_time']){
                    echo date('Y-m-d',$row['create_time']);
                }else{
                    echo  date('Y-m-d');
                }

                ?></i>
            <i class="am-icon-hand-pointer-o">12322</i>
        </div>
        <?php
                    }
                    ?>
    </ul>
</div>
<div class="am-container" style="margin: 100px auto">
    <ul data-am-widget="pagination" class="am-pagination am-pagination-default am-text-center">


        <li class="am-pagination-first ">
            <?=$page?>/<?=$page_num?>&nbsp;&nbsp;
        </li>
        <li class="am-pagination-first ">
            <a href="?page=1">第一页</a>
        </li>

        <li class="am-pagination-prev ">
            <a href="?page=<?=$prepage?>">上一页</a>
        </li>

        <li class="am-pagination-next ">
            <a href="?page=<?=$nextpage?>">下一页</a>
        </li>

        <li class="am-pagination-last ">
            <a href="?page=<?=$page_num?>">最末页</a>
        </li>
    </ul>
</div>




<div data-am-widget="gotop" class="am-gotop am-gotop-fixed" >
    <a href="#top" title="回到顶部">
        <span class="am-gotop-title">回到顶部</span>
        <i class="am-gotop-icon am-icon-chevron-up"></i>
    </a>
</div>

<footer>
<div class="content">
    <!--        <ul class="am-avg-sm-5 am-avg-md-5 am-avg-lg-5 am-thumbnails">-->
    <a href="#">联系我们:15983747839</a>&nbsp&nbsp&nbsp&nbsp
    <a href="#">加入我们</a>&nbsp&nbsp&nbsp&nbsp
    <a href="#">合作伙伴</a>&nbsp&nbsp&nbsp&nbsp
    <a href="#">广告及服务</a>&nbsp&nbsp&nbsp&nbsp
    <a href="#">友情链接</a>&nbsp&nbsp&nbsp&nbsp
    <!--        </ul>-->
    <div><?php require_once('inc/footer.php'); ?></div>

</div>
</footer>
</body>
</html>